/**
 * 外观模式
 * 隐藏内部的细节
 */

class Circle{
    draw(){
        console.log('draw circle')
    }
}

class Triangle{
    draw(){
        console.log('draw triangle')
    }
}

//暴露的接口类
class ShapeMaker{
    constructor(){
        this.circle = new Circle()
        this.triangle = new Triangle()
    }
    drawTri(){
        this.triangle.draw()
    }
    drawCircle(){
        this.circle.draw()
    }
}

const maker = new ShapeMaker()
maker.drawCircle()
maker.drawTri()
